Optimal. Leaf size=109 \[ \frac{2 \sqrt{a} B \tan ^{-1}\left (\frac{\sqrt{c} \sqrt{a+i a \tan (e+f x)}}{\sqrt{a} \sqrt{c-i c \tan (e+f x)}}\right )}{\sqrt{c} f}-\frac{(B+i A) \sqrt{a+i a \tan (e+f x)}}{f \sqrt{c-i c \tan (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.219721, antiderivative size = 109, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 45, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.111, Rules used = {3588, 78, 63, 217, 203} \[ \frac{2 \sqrt{a} B \tan ^{-1}\left (\frac{\sqrt{c} \sqrt{a+i a \tan (e+f x)}}{\sqrt{a} \sqrt{c-i c \tan (e+f x)}}\right )}{\sqrt{c} f}-\frac{(B+i A) \sqrt{a+i a \tan (e+f x)}}{f \sqrt{c-i c \tan (e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3588
Rule 78
Rule 63
Rule 217
Rule 203
Rubi steps
\begin{align*} \int \frac{\sqrt{a+i a \tan (e+f x)} (A+B \tan (e+f x))}{\sqrt{c-i c \tan (e+f x)}} \, dx &=\frac{(a c) \operatorname{Subst}\left (\int \frac{A+B x}{\sqrt{a+i a x} (c-i c x)^{3/2}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{(i A+B) \sqrt{a+i a \tan (e+f x)}}{f \sqrt{c-i c \tan (e+f x)}}+\frac{(i a B) \operatorname{Subst}\left (\int \frac{1}{\sqrt{a+i a x} \sqrt{c-i c x}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{(i A+B) \sqrt{a+i a \tan (e+f x)}}{f \sqrt{c-i c \tan (e+f x)}}+\frac{(2 B) \operatorname{Subst}\left (\int \frac{1}{\sqrt{2 c-\frac{c x^2}{a}}} \, dx,x,\sqrt{a+i a \tan (e+f x)}\right )}{f}\\ &=-\frac{(i A+B) \sqrt{a+i a \tan (e+f x)}}{f \sqrt{c-i c \tan (e+f x)}}+\frac{(2 B) \operatorname{Subst}\left (\int \frac{1}{1+\frac{c x^2}{a}} \, dx,x,\frac{\sqrt{a+i a \tan (e+f x)}}{\sqrt{c-i c \tan (e+f x)}}\right )}{f}\\ &=\frac{2 \sqrt{a} B \tan ^{-1}\left (\frac{\sqrt{c} \sqrt{a+i a \tan (e+f x)}}{\sqrt{a} \sqrt{c-i c \tan (e+f x)}}\right )}{\sqrt{c} f}-\frac{(i A+B) \sqrt{a+i a \tan (e+f x)}}{f \sqrt{c-i c \tan (e+f x)}}\\ \end{align*}
Mathematica [A] time = 4.0114, size = 127, normalized size = 1.17 \[ \frac{\sqrt{a+i a \tan (e+f x)} \left (\cos \left (\frac{1}{2} (e+f x)\right )-i \sin \left (\frac{1}{2} (e+f x)\right )\right ) \left (\sin \left (\frac{1}{2} (e+f x)\right )-i \cos \left (\frac{1}{2} (e+f x)\right )\right ) \left (A+2 B \tan ^{-1}\left (e^{i (e+f x)}\right ) (\sin (e+f x)+i \cos (e+f x))-i B\right )}{f \sqrt{c-i c \tan (e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.233, size = 321, normalized size = 2.9 \begin{align*}{\frac{-i}{cf \left ( \tan \left ( fx+e \right ) +i \right ) ^{2}}\sqrt{a \left ( 1+i\tan \left ( fx+e \right ) \right ) }\sqrt{-c \left ( -1+i\tan \left ( fx+e \right ) \right ) } \left ( -2\,iB\ln \left ({ \left ( ac\tan \left ( fx+e \right ) +\sqrt{ac \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }\sqrt{ac} \right ){\frac{1}{\sqrt{ac}}}} \right ) \tan \left ( fx+e \right ) ac-B\ln \left ({ \left ( ac\tan \left ( fx+e \right ) +\sqrt{ac \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }\sqrt{ac} \right ){\frac{1}{\sqrt{ac}}}} \right ) \left ( \tan \left ( fx+e \right ) \right ) ^{2}ac+iA\sqrt{ac \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }\sqrt{ac}\tan \left ( fx+e \right ) +iB\sqrt{ac \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }\sqrt{ac}+B\ln \left ({ \left ( ac\tan \left ( fx+e \right ) +\sqrt{ac \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }\sqrt{ac} \right ){\frac{1}{\sqrt{ac}}}} \right ) ac+B\sqrt{ac \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }\sqrt{ac}\tan \left ( fx+e \right ) -A\sqrt{ac \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }\sqrt{ac} \right ){\frac{1}{\sqrt{ac \left ( 1+ \left ( \tan \left ( fx+e \right ) \right ) ^{2} \right ) }}}{\frac{1}{\sqrt{ac}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.53387, size = 830, normalized size = 7.61 \begin{align*} -\frac{c f \sqrt{-\frac{B^{2} a}{c f^{2}}} \log \left (\frac{4 \,{\left (2 \,{\left (B e^{\left (2 i \, f x + 2 i \, e\right )} + B\right )} \sqrt{\frac{a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt{\frac{c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} e^{\left (i \, f x + i \, e\right )} +{\left (c f e^{\left (2 i \, f x + 2 i \, e\right )} - c f\right )} \sqrt{-\frac{B^{2} a}{c f^{2}}}\right )}}{B e^{\left (2 i \, f x + 2 i \, e\right )} + B}\right ) - c f \sqrt{-\frac{B^{2} a}{c f^{2}}} \log \left (\frac{4 \,{\left (2 \,{\left (B e^{\left (2 i \, f x + 2 i \, e\right )} + B\right )} \sqrt{\frac{a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt{\frac{c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} e^{\left (i \, f x + i \, e\right )} -{\left (c f e^{\left (2 i \, f x + 2 i \, e\right )} - c f\right )} \sqrt{-\frac{B^{2} a}{c f^{2}}}\right )}}{B e^{\left (2 i \, f x + 2 i \, e\right )} + B}\right ) -{\left ({\left (-2 i \, A - 2 \, B\right )} e^{\left (2 i \, f x + 2 i \, e\right )} - 2 i \, A - 2 \, B\right )} \sqrt{\frac{a}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} \sqrt{\frac{c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}} e^{\left (i \, f x + i \, e\right )}}{2 \, c f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sqrt{a \left (i \tan{\left (e + f x \right )} + 1\right )} \left (A + B \tan{\left (e + f x \right )}\right )}{\sqrt{- c \left (i \tan{\left (e + f x \right )} - 1\right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \tan \left (f x + e\right ) + A\right )} \sqrt{i \, a \tan \left (f x + e\right ) + a}}{\sqrt{-i \, c \tan \left (f x + e\right ) + c}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]